home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / tetris / patch1 < prev   
Encoding:
Internet Message Format  |  1989-03-23  |  6.1 KB

  1. Path: uunet!lll-winken!ames!pasteur!ucbvax!tut.cis.ohio-state.edu!rutgers!rochester!cornell!uw-beaver!tektronix!tekgen!tekred!games
  2. From: games@tekred.CNA.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v06i035:  tetris - popular game of dropping blocks, Patch1
  5. Message-ID: <3757@tekred.CNA.TEK.COM>
  6. Date: 22 Mar 89 23:42:43 GMT
  7. Sender: billr@tekred.CNA.TEK.COM
  8. Lines: 166
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: jik@athena.mit.edu (Jonathan I. Kamens)
  12. Posting-number: Volume 6, Issue 35
  13. Archive-name: tetris/Patch1
  14.  
  15.     [This has also appeared in th ebugs newsgroup, but I'm passing
  16.      it on here so it will be archived.  -br]
  17.  
  18. [[The patch below to the tetris sources fixes the following problems:
  19.  
  20. 1. Passing a char ** into a function expecting a char *.  A typecast
  21.    is all that is needed.
  22. 2. Numbers that are supposed to be integers (some of which are greater
  23.    than 7 -- think about it) being preceded in the sources by a 0.
  24.    The 0's are deleted or replaced with spaces.
  25. 3. Assigning the return value of getopt() to a char.  Changed the char
  26.    to an int.
  27. 4. Checking for TETRIS environmant variable existance with a != NULL.
  28.  
  29. Jonathan Kamens                          USnail:
  30. MIT Project Athena                410 Memorial Drive, No. 223F
  31. jik@Athena.MIT.EDU                Cambridge, MA 02139-4318
  32. Office: 617-253-4261                  Home: 617-225-8218
  33. ]]
  34.  
  35. #! /bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of shell archive."
  42. # Contents:  Patches01
  43. # Wrapped by billr@saab on Wed Mar 22 14:40:11 1989
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'Patches01' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'Patches01'\"
  47. else
  48. echo shar: Extracting \"'Patches01'\" \(3908 characters\)
  49. sed "s/^X//" >'Patches01' <<'END_OF_FILE'
  50. X*** csr.c.orig    Tue Feb 28 12:32:15 1989
  51. X--- csr.c    Wed Mar 22 14:37:57 1989
  52. X***************
  53. X*** 47,54 ****
  54. X      char           *tgetstr();
  55. X      char           *name;
  56. X  
  57. X!     tospaces(window0, MAX_Y * MAX_X);
  58. X!     tospaces(window1, MAX_Y * MAX_X);
  59. X      _csrx = 9000;
  60. X      _csry = 9000;
  61. X      _rx = 9000;
  62. X--- 47,54 ----
  63. X      char           *tgetstr();
  64. X      char           *name;
  65. X  
  66. X!     tospaces((char *) window0, MAX_Y * MAX_X);
  67. X!     tospaces((char *) window1, MAX_Y * MAX_X);
  68. X      _csrx = 9000;
  69. X      _csry = 9000;
  70. X      _rx = 9000;
  71. X*** end_game.c.orig    Tue Feb 28 12:32:23 1989
  72. X--- end_game.c    Wed Mar 22 14:37:57 1989
  73. X***************
  74. X*** 185,191 ****
  75. X                      sprintf(aan, "a");
  76. X              }
  77. X                     mvaddstr(8,15,"__________");
  78. X!                  mvaddstr(09,14,"/          \\");
  79. X                  mvaddstr(10,13,"/    REST    \\");
  80. X                 mvaddstr(11,12,"/      IN      \\");
  81. X                mvaddstr(12,11,"/     PEACE      \\");
  82. X--- 185,191 ----
  83. X                      sprintf(aan, "a");
  84. X              }
  85. X                     mvaddstr(8,15,"__________");
  86. X!                  mvaddstr( 9,14,"/          \\");
  87. X                  mvaddstr(10,13,"/    REST    \\");
  88. X                 mvaddstr(11,12,"/      IN      \\");
  89. X                mvaddstr(12,11,"/     PEACE      \\");
  90. X*** get_level.c.orig    Tue Feb 28 12:32:25 1989
  91. X--- get_level.c    Wed Mar 22 14:37:58 1989
  92. X***************
  93. X*** 23,30 ****
  94. X      save_screen(5,19,16,62);
  95. X      clear(5,19,16,62);
  96. X  
  97. X!     mvaddstr(05,19, "+-----------------------------------------+");
  98. X!     mvaddstr(06,19, "| Starting level:                         |");
  99. X      mvaddstr(15,19, "|    [hjkl] to move, [space] to toggle    |");
  100. X      for(i=7; i<15; i++)
  101. X          mvaddstr(i,19,"|                                         |");
  102. X--- 23,30 ----
  103. X      save_screen(5,19,16,62);
  104. X      clear(5,19,16,62);
  105. X  
  106. X!     mvaddstr( 5,19, "+-----------------------------------------+");
  107. X!     mvaddstr( 6,19, "| Starting level:                         |");
  108. X      mvaddstr(15,19, "|    [hjkl] to move, [space] to toggle    |");
  109. X      for(i=7; i<15; i++)
  110. X          mvaddstr(i,19,"|                                         |");
  111. X***************
  112. X*** 31,39 ****
  113. X      mvaddstr(11,19, "| Rows of obstacles:                      |");
  114. X      mvaddstr(16,19,"+-----------------------------------------+");
  115. X  
  116. X!     mvaddstr(07,21,"**** **** **** **** **** **** **** ****");
  117. X!     mvaddstr(08,21,"*00* *01* *03* *05* *07* *09* *11* *13*");
  118. X!     mvaddstr(09,21,"**** **** **** **** **** **** **** ****");
  119. X  
  120. X      mvaddstr(12,21,"**** **** **** **** **** **** **** ****");
  121. X      mvaddstr(13,21,"*00* *01* *03* *05* *07* *09* *11* *13*");
  122. X--- 31,39 ----
  123. X      mvaddstr(11,19, "| Rows of obstacles:                      |");
  124. X      mvaddstr(16,19,"+-----------------------------------------+");
  125. X  
  126. X!     mvaddstr(7,21,"**** **** **** **** **** **** **** ****");
  127. X!     mvaddstr(8,21,"*00* *01* *03* *05* *07* *09* *11* *13*");
  128. X!     mvaddstr(9,21,"**** **** **** **** **** **** **** ****");
  129. X  
  130. X      mvaddstr(12,21,"**** **** **** **** **** **** **** ****");
  131. X      mvaddstr(13,21,"*00* *01* *03* *05* *07* *09* *11* *13*");
  132. X*** main.c.orig    Wed Mar 22 14:37:33 1989
  133. X--- main.c    Wed Mar 22 14:37:59 1989
  134. X***************
  135. X*** 38,44 ****
  136. X      /* I do a lot of voids, so that lint doesn't complain */
  137. X      void init_tetris(), print_shape(), setup_next(), drop_block(); 
  138. X  
  139. X!     char c, input;                        /* holds user's keypresses */
  140. X      char tetrisenv[1024];
  141. X      char buf[1024];
  142. X      int i=0, j=0, k=0, disp_score;
  143. X--- 38,45 ----
  144. X      /* I do a lot of voids, so that lint doesn't complain */
  145. X      void init_tetris(), print_shape(), setup_next(), drop_block(); 
  146. X  
  147. X!     int c;
  148. X!     char input;                        /* holds user's keypresses */
  149. X      char tetrisenv[1024];
  150. X      char buf[1024];
  151. X      int i=0, j=0, k=0, disp_score;
  152. X*** useful.c.orig    Tue Feb 28 12:32:35 1989
  153. X--- useful.c    Wed Mar 22 14:37:59 1989
  154. X***************
  155. X*** 40,45 ****
  156. X  
  157. X  void cont_hand() {
  158. X      init_csr();
  159. X!     bfill(window0, sizeof(window0), ' ');
  160. X      refresh();
  161. X  }
  162. X--- 40,45 ----
  163. X  
  164. X  void cont_hand() {
  165. X      init_csr();
  166. X!     bfill((char *) window0, sizeof(window0), ' ');
  167. X      refresh();
  168. X  }
  169. END_OF_FILE
  170. if test 3908 -ne `wc -c <'Patches01'`; then
  171.     echo shar: \"'Patches01'\" unpacked with wrong size!
  172. fi
  173. # end of 'Patches01'
  174. fi
  175. echo shar: End of shell archive.
  176. exit 0
  177.